using Light;
using Light.Assets.Scripts.EventManager;
using UnityEngine;

namespace Dream
{
    public class ExitDreamTest : MonoBehaviour
    {
        private bool _isExit;

        // Update is called once per frame
        private void Update()
        {
            _isExit = LightInputManager.Instance.ContinueTalkInput;
            if (_isExit)
                ExitDream();
        }

        private void ExitDream()
        {
            using var evt = NextSceneLoad.Get();
            evt.isFadeScreen = true;
            evt.isExitScene = true;
            EventManager.SendEvent(evt);
        }
    }
}